﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<MVCLD.Models.Article>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Article
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit Article</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleTitle) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.ArticleTitle) %>
                <%= Html.ValidationMessageFor(model => model.ArticleTitle) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SubmitterName) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SubmitterName) %>
                <%= Html.ValidationMessageFor(model => model.SubmitterName) %>
            </div>
            
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.IsLive) %>
            </div>
            <div class="editor-field">
                <%= Html.CheckBoxFor(model => model.IsLive) %>
                <%= Html.ValidationMessageFor(model => model.IsLive) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.IsFeatured) %>
            </div>
            <div class="editor-field">
                <%= Html.CheckBoxFor(model => model.IsFeatured) %>
                <%= Html.ValidationMessageFor(model => model.IsFeatured) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleSnippet) %>
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.ArticleSnippet, 10, 40, new { @class = "ArticleSnippet"})%>
                <%= Html.ValidationMessageFor(model => model.ArticleSnippet) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleContent) %> (No HTML Allowed) - Min Word Count 
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.ArticleContent, 25, 40, new { @class = "ArticleContent" })%>
                <%= Html.ValidationMessageFor(model => model.ArticleContent) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Resource) %><strong>(Only BBCode Allowed)</strong>:<br />
                Links: [url=http://web.com] Name [/url]<br /> Bold: [b] bold [/b]<br /> Italic: [i] italic [/i]
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.Resource, 9, 40, new { @class = "ResourceArea" })%>
                <%= Html.ValidationMessageFor(model => model.Resource) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.CategoryID) %>
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.CategoryID) %>
                <%= Html.ValidationMessageFor(model => model.CategoryID) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.SubmitterIP) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.SubmitterIP) %>
                <%= Html.ValidationMessageFor(model => model.SubmitterIP) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Email) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Email) %>
                <%= Html.ValidationMessageFor(model => model.Email) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.ArticleTypeID) %>
            </div>
            <div class="editor-field">
                <%= Html.EditorFor(model => model.ArticleTypeID)%>
                <%= Html.ValidationMessageFor(model => model.ArticleTypeID) %>
            </div>
            
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

